package com.csun.dsms.controller;

import com.csun.dsms.comment.core.annotation.Authorization;
import com.csun.dsms.comment.core.utils.wrapper.Wrapper;
import com.csun.dsms.service.HgIndustryElectricityDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 *工业用电
 */
@Slf4j
@RestController
@RequestMapping("/industryElectricityData")
public class HgIndustryElectricityDataController {

    @Autowired
    private HgIndustryElectricityDataService hgIndustryElectricityDataService;

    /**
     * 导入数据
     */
    @Authorization
    @RequestMapping(value = "/importIndustryElectricityData",method = RequestMethod.POST)
    public Wrapper importIndustryElectricityData (@RequestParam("file") MultipartFile file) {
        return hgIndustryElectricityDataService.importIndustryElectricityData(file);
    }

}
